<?php if ($pager->haveToPaginate()): ?>

   <p><?php echo link_to('上一页', "@{$route}?page={$pager->getPreviousPage()}&cid={$cid}") ?></p>
       <?php foreach ($pager->getLinks() as $page): ?>
      <?php if ($pager->getPage() == $page): ?>
        <?php echo $page ?>
      <?php else: ?>
       <p> <?php echo link_to($page, "@{$route}?page={$page}&cid={$cid}") ?></p>
      <?php endif ?>
    <?php endforeach ?>
  <p><?php echo link_to('下一页', "@{$route}?page={$pager->getNextPage()}&cid={$cid}") ?></p>

<?php endif ?>